package easy;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class test {

    public static void main(String[] args) {
//        String a="DF1119A";
//        String b="C";
//        int count=0;
//        for (char c : a.toCharArray()) {
//            count++;
//            int index =c-'A';
//            if (index<0){
//                break;
//            }
//            System.out.println("index = " + index);
//        }
//        System.out.println(a.charAt(a.length()-1)-'A');
//        System.out.println("a.substring(0,count-1) = " + a.substring(0,count-1));
//        System.out.println("a.substring(0,count-1) = " +Integer.parseInt(a.substring(count-1)));

        //准备map数据
        List<Map<String,String>> mapDatas = new ArrayList<>();
        for (int i = 0; i < 20; i++) {
            Map<String,String> map = new HashMap<>();
            if (i % 2 == 0){
                map.put("province","北京");
                map.put("listcount",""+i*Math.round(15f));
                map.put("index",""+i);
            }else {
                map.put("province","上海");
                map.put("listcount",""+i*Math.round(15f));
                map.put("index",i+"");
            }
            mapDatas.add(map);
        }

        mapDatas.stream().forEach(o->{
            o.put("listcount","QAQ"+o.get("index"));
            System.out.println("o = " + o);
        });

        HashMap<String, BigDecimal> result = new HashMap<>();
        BigDecimal errCount = (BigDecimal) result.get("errorTag");
        System.out.println(errCount.compareTo(BigDecimal.ZERO));
        System.out.println("errCount = " + errCount);
        System.out.println("errCount = " + errCount);



    }




}

